package com.iknow.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TabHost;
import android.widget.TabHost.TabContentFactory;
import android.widget.TabHost.TabSpec;
import com.iknow.IKnow;
import com.iknow.data.QingboType;
import com.iknow.db.IKnowDataBase;
import com.mobclick.android.MobclickAgent;

public class ChoseBolgActivity extends MenuActivity
{
  private View.OnClickListener PostAudioButtonClickListener;
  private View.OnClickListener PostImageButtonClickListener;
  private View.OnClickListener PostTextButtonClickListener;
  private final String TAG = "ChoseBolgActivity";
  private Button mPostAudioButton;
  private Button mPostImageButton;
  private Button mPostTextButton;

  public ChoseBolgActivity()
  {
    this.PostTextButtonClickListener = new View.OnClickListener(this)
    {
      public void onClick()
      {
        MobclickAgent.onEvent(this.this$0, "share_click", "英语问答");
        ChoseBolgActivity.access$0(this.this$0, QingboType.image);
      }
    };
    this.PostImageButtonClickListener = new View.OnClickListener(this)
    {
      public void onClick()
      {
        MobclickAgent.onEvent(this.this$0, "share_click", "爱英语，爱分享");
        ChoseBolgActivity.access$0(this.this$0, QingboType.text);
      }
    };
    this.PostAudioButtonClickListener = new View.OnClickListener(this)
    {
      public void onClick()
      {
        ChoseBolgActivity.access$0(this.this$0, QingboType.audio);
      }
    };
  }

  private void initView()
  {
    setContentView(2130903045);
    this.mPostTextButton = ((Button)findViewById(2131296284));
    this.mPostTextButton.setOnClickListener(this.PostTextButtonClickListener);
    this.mPostImageButton = ((Button)findViewById(2131296285));
    this.mPostImageButton.setOnClickListener(this.PostImageButtonClickListener);
  }

  private void startWriteActivity(QingboType paramQingboType)
  {
    if (IKnow.mIKnowDataBase.getUser() == null)
      startActivity(new Intent(this, LoginActivity.class));
    while (true)
    {
      return;
      Intent localIntent = new Intent(this, WriteBlogActivity.class);
      localIntent.putExtra("type", paramQingboType.toString());
      startActivity(localIntent);
    }
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    requestWindowFeature(1);
    initView();
    TabHost localTabHost = getTabHost();
    localTabHost.setup();
    localTabHost.addTab(localTabHost.newTabSpec("").setIndicator("").setContent(new TabHost.TabContentFactory(this)
    {
      public View createTabContent()
      {
        return this.this$0.findViewById(2131296283);
      }
    }));
  }

  protected void onDestroy()
  {
    super.onDestroy();
  }

  protected void onPause()
  {
    MobclickAgent.onPause(this);
    super.onPause();
  }

  protected void onResume()
  {
    MobclickAgent.onResume(this);
    MobclickAgent.setSessionContinueMillis(600000L);
    super.onResume();
  }
}